<template>
	<view class="page">
		<view class="logo">
			<image src="https://pw.qyang.cc/static/basicprofile.png" />
			<text>陪玩App</text>
		</view>
		<view class="btn">
			<a :href="'peiwanapp://'+ path" class="btn-item">
				陪玩App内打开
			</a>
			<view class="btn-item" @click="download">
				下载陪玩App
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		name: 'Share',
		data() {
			return {
				path: '',
			}
		},
		onload(e) {
			if(e.type == 'square'){
				this.path = 'subpages/share/share'
			}
			if(e.type == 'squareDetail'){
				this.path = 'subpages/share/detail?id='+e.id
			}
		},
		methods: {
			download() {
				
			}
		}	
	}
</script>
<style scoped lang="scss">
	.page {
		display: flex;
		flex-direction: column;
		align-items: center;
		background: #fff;
		height: 100vh;

		.logo {
			display: flex;
			flex-direction: column;
			align-items: center;
			margin: 100rpx 0;

			image {
				width: 100rpx;
				height: 100rpx;
				margin-top: 200rpx;
				border-radius: 20rpx;
			}

			text {
				font-size: 30rpx;
				color: #333;
				margin-top: 20rpx;
			}
		}

		.btn {
			display: flex;
			flex-direction: column;
			align-items: center;

			.btn-item {
				width: 500rpx;
				height: 80rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				font-size: 30rpx;
				border-radius: 80rpx;
				margin: 20rpx 0;
				text-decoration: none;
				border:1rpx solid #FF5866;

				&:nth-child(1) {
					background: #FF5866;
					color: #fff;
				}

				&:nth-child(2) {
					background: #fff;
					color: #FF5866;
					border:1rpx solid #FF5866;
				}
			}
		}
	}
</style>